/* Wall kick tables for LOCKJAW, an implementation of the Soviet Mind Game

Copyright (C) 2006 Damian Yerrick <tepples+lj@spamcop.net>

This work is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Original game concept and design by Alexey Pajitnov.
The Software is not sponsored or endorsed by Alexey Pajitnov, Elorg,
or The Tetris Company LLC.

*/

package fizzpicks.tetrapulp.tetrapulp;

import java.util.Map;
import java.util.EnumMap;

/**
 * Created by will
 * Date: May 3, 2008 7:18:38 AM
 */

class LJRotSystem {
    /**
     * Color scheme for this rotation system (0: SRS; 1: Sega)
     * Use colorset 0 (SRS) if all free-space kicks are WK(0, 0).
     * Otherwise, your rotation system has what Eddie Rogers has called
     * a topknot, and you should use Sega colors.
     */
    private static final int N_PIECE_SHAPES = 10;

    int colorScheme;
    int[] reserved1 = new int[3];
    int entryOffset[] = new int[N_PIECE_SHAPES];
    int entryTheta[] = new int[N_PIECE_SHAPES];
    /* These control which kick table is used for each piece.
    * If negative, no kick table is present.
    */
    int[] kicksL = new int[N_PIECE_SHAPES];
    int[] kicksR = new int[N_PIECE_SHAPES];
    public int[][][] kickTables = new int[4][Lockjaw.KICK_TABLE_LEN][];
}

public class WK {

    // If ARIKA_IF_NOT_CENTER is specified, check the free space
    // rotation for blocks in columns other than 1, and stop if
    // none of them are filled.  This obsoletes the old SKIP_IF.
    public static final int SKIP_IF = 0x80;
    public static final int SKIP_IF3 = 0x82;

    public static final int ARIKA_IF_NOT_CENTER = 0x83;
    public static final int WK_END = 0x8F;

    //#ifdef LJ_INTERNAL
    // Used for defining wall kick tables:
    // WK(x, y) builds a 1-byte record with 2 coordinates, at 4 bits
    // per coordinate.
    // WKX() and WKY() retrieve the X or Y coordinate from this record.
    // The  ((stuff ^ 8) - 8) is sign extension magick
    public static int WK(int x, int y) {
        return (((x) & 0x0F) | ((y) & 0x0F) << 4);
    }

    public static int WKX(int wk) {
        return ((((wk) & 0x0F) ^ 8) - 8);
    }

    public static int WKY(int wk) {
        return WKX((wk) >> 4);
    }

// These wall kicks are for rotation TO a given orientation.
    // Based on http://www.the-shell.net/img/srs_study.html
    static final LJRotSystem rotSRS = new LJRotSystem();

    static {
        rotSRS.kicksL = new int[]{1, 0, 0, -1, 0, 0, 0, -1, 0, -1};
        rotSRS.kicksR = new int[]{3, 2, 2, -1, 2, 2, 2, -1, 2, -3};
        rotSRS.kickTables = new int[][][]{

                // 0: JLSTZ counterclockwise
                {
                        {WK(0, 0), WK(1, 0), WK(1, -1), WK(0, 2), WK(1, 2)},  // R->U
                        {WK(0, 0), WK(-1, 0), WK(-1, 1), WK(0, -2), WK(-1, -2)},  // D->R
                        {WK(0, 0), WK(-1, 0), WK(-1, -1), WK(0, 2), WK(-1, 2)},  // L->D
                        {WK(0, 0), WK(1, 0), WK(1, 1), WK(0, -2), WK(1, -2)}   // U->L
                },

                // 1: I counterclockwise
                {
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(-1, -2), WK(2, 1)},  // R->U
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(1, -1), WK(-2, 1)},  // D->R
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(-2, -1), WK(1, 2)},  // L->D
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(2, -1), WK(-1, 2)}   // U->L
                },

                // 2: JLSTZ clockwise
                {
                        {WK(0, 0), WK(-1, 0), WK(-1, -1), WK(0, 2), WK(-1, 2)},  // L->U
                        {WK(0, 0), WK(-1, 0), WK(-1, 1), WK(0, -2), WK(-1, -2)},  // U->R
                        {WK(0, 0), WK(1, 0), WK(1, -1), WK(0, 2), WK(1, 2)},  // R->D
                        {WK(0, 0), WK(1, 0), WK(1, 1), WK(0, -2), WK(1, -2)},  // D->L
                },

                // 3: I clockwise
                {
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(1, -2), WK(-2, 1)},  // L->U
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(-2, -1), WK(1, 2)},  // U->R
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(2, -1), WK(-1, 2)},  // R->D
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(-1, -1), WK(2, 1)}   // D->L
                }
        };
    }

// I: round to top right
// J, L, T: round to bottom
// S: round to bottom left (constant center column)
    // Z: round to bottom right (constant center column)
    static final LJRotSystem rotSega = new LJRotSystem();

    static {
        rotSega.colorScheme = 1;
        rotSega.entryOffset = new int[]{
                WK(0, 0), WK(0, 1), WK(0, 1), WK(0, 0), WK(0, 0), WK(0, 1), WK(0, 0),
                WK(0, 0), WK(0, 0), WK(0, 0)
        };
        rotSega.entryTheta = new int[]{0, 2, 2, 0, 0, 2, 0, 0, 0, 2};
        rotSega.kicksL = new int[]{0, 1, 1, -1, 2, 1, 3, 0, -1, -1};
        rotSega.kicksR = new int[]{4, 5, 5, -1, 6, 5, 7, 4, -1, -1};
        rotSega.kickTables = new int[][][]{

                // 0: I counterclockwise
                {
                        {WK(0, 0), WK_END},  // R->U
                        {WK(0, -1), WK_END},  // D->R
                        {WK(-1, 1), WK_END},  // L->D
                        {WK(1, 0), WK_END}   // U->L
                },

                // 1: JLT counterclockwise
                {
                        {WK(0, -1), WK_END},  // R->U
                        {WK(0, 0), WK_END},  // D->R
                        {WK(0, 0), WK_END},  // L->D
                        {WK(0, 1), WK_END}   // U->L
                },

                // 2: S counterclockwise (round left, like Game Boy)
                {
                        {WK(1, -1), WK_END},  // R->U
                        {WK(-1, 0), WK_END},  // D->R
                        {WK(0, 0), WK_END},  // L->D
                        {WK(0, 1), WK_END}   // U->L
                },

                // 3: Z counterclockwise (round right, like NES)
                {
                        {WK(0, -1), WK_END},  // R->U
                        {WK(0, 0), WK_END},  // D->R
                        {WK(-1, 0), WK_END},  // L->D
                        {WK(1, 1), WK_END}   // U->L
                },

                // 4: I clockwise
                {
                        {WK(-1, 0), WK_END},  // L->U
                        {WK(0, 0), WK_END},  // U->R
                        {WK(0, 1), WK_END},  // R->D
                        {WK(1, -1), WK_END}   // D->L
                },

                // 5: JLT clockwise
                {
                        {WK(0, -1), WK_END},  // L->U
                        {WK(0, 1), WK_END},  // U->R
                        {WK(0, 0), WK_END},  // R->D
                        {WK(0, 0), WK_END}   // D->L
                },

                // 6: S clockwise (round left)
                {
                        {WK(0, -1), WK_END},  // L->U
                        {WK(-1, 1), WK_END},  // U->R
                        {WK(1, 0), WK_END},  // R->D
                        {WK(0, 0), WK_END}   // D->L
                },

                // 7: Z clockwise (round right)
                {
                        {WK(-1, -1), WK_END},  // L->U
                        {WK(0, 1), WK_END},  // U->R
                        {WK(0, 0), WK_END},  // R->D
                        {WK(1, 0), WK_END}   // D->L
                }
        };
    }

    ;

// Arika is based on Sega but with a few wall kicks.
// Each free-space kick should be followed by Right, then Left
// but for J, L, and T, kicks to vertical positions (point-right and
// point-left)
// T when rotating to point-up can also floor kick by one,
    // and I when rotating to vertical can floor kick by one or two.
    static final LJRotSystem rotArika = new LJRotSystem();

    static {
        rotArika.colorScheme = 1;
        rotArika.entryOffset = new int[]{
                WK(0, 0), WK(0, 1), WK(0, 1), WK(0, 0), WK(0, 0), WK(0, 1), WK(0, 0),
                WK(0, 0), WK(0, 0), WK(0, 0)
        };
        rotArika.entryTheta = new int[]{0, 2, 2, 0, 0, 2, 0, 0, 0, 2};
        rotArika.kicksL = new int[]{0, 1, 1, -1, 2, 8, 3, 0, -1, -1};
        rotArika.kicksR = new int[]{4, 5, 5, -1, 6, 9, 7, 4, -1, -1};
        rotArika.kickTables = new int[][][]{

                // 0: I counterclockwise
                {
                        {WK(0, 0), WK_END},  // R->U
                        {WK(0, -1), WK(0, 0), WK(0, 1), WK_END},  // D->R
                        {WK(-1, 1), WK_END},  // L->D
                        {WK(1, 0), WK(1, 1), WK(1, 2), WK_END}   // U->L
                },

                // 1: JL counterclockwise
                {
                        {WK(0, -1), WK(1, -1), WK(-1, -1), WK_END},  // R->U
                        {WK(0, 0), ARIKA_IF_NOT_CENTER, WK(1, 0), WK(-1, 0), WK_END},  // D->R
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END},  // L->D
                        {WK(0, 1), ARIKA_IF_NOT_CENTER, WK(1, 1), WK(-1, 1), WK_END}   // U->L
                },

                // 2: S counterclockwise (round left, like Game Boy with WK)
                {
                        {WK(1, -1), WK(2, -1), WK(0, -1), WK_END},  // R->U
                        {WK(-1, 0), WK(0, 0), WK(-2, 0), WK_END},  // D->R
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END},  // L->D
                        {WK(0, 1), WK(1, 1), WK(-1, 1), WK_END}   // U->L
                },

                // 3: Z counterclockwise (round right, like NES with WK)
                {
                        {WK(0, -1), WK(1, -1), WK(-1, -1), WK_END},  // R->U
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END},  // D->R
                        {WK(-1, 0), WK(0, 0), WK(-2, 0), WK_END},  // L->D
                        {WK(1, 1), WK(2, 1), WK(0, 1), WK_END}   // U->L
                },

                // 4: I clockwise
                {
                        {WK(-1, 0), WK_END},  // L->U
                        {WK(0, 0), WK(0, 1), WK(0, 2), WK_END},  // U->R
                        {WK(0, 1), WK_END},  // R->D
                        {WK(1, -1), WK(1, 0), WK(1, 1), WK_END}   // D->L
                },

                // 5: JLT clockwise
                {
                        {WK(0, -1), WK(1, -1), WK(-1, -1), WK_END},  // L->U
                        {WK(0, 1), ARIKA_IF_NOT_CENTER, WK(1, 1), WK(-1, 1), WK_END},  // U->R
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END},  // R->D
                        {WK(0, 0), ARIKA_IF_NOT_CENTER, WK(1, 0), WK(-1, 0), WK_END}   // D->L
                },

                // 6: S clockwise (round left)
                {
                        {WK(0, -1), WK(1, -1), WK(-1, -1), WK_END},  // L->U
                        {WK(-1, 1), WK(0, 1), WK(-2, 1), WK_END},  // U->R
                        {WK(1, 0), WK(2, 0), WK(0, 0), WK_END},  // R->D
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END}   // D->L
                },

                // 7: Z clockwise (round right)
                {
                        {WK(-1, -1), WK(0, -1), WK(-2, -1), WK_END},  // L->U
                        {WK(0, 1), WK(1, 1), WK(-1, 1), WK_END},  // U->R
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END},  // R->D
                        {WK(1, 0), WK(2, 0), WK(0, 0), WK_END}   // D->L
                },

                // 8: T counterclockwise (with TI floorkick)
                {
                        {WK(0, -1), WK(1, -1), WK(-1, -1), WK(0, 0), WK_END},  // R->U
                        {WK(0, 0), ARIKA_IF_NOT_CENTER, WK(1, 0), WK(-1, 0), WK_END},  // D->R
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END},  // L->D
                        {WK(0, 1), ARIKA_IF_NOT_CENTER, WK(1, 1), WK(-1, 1), WK_END}   // U->L
                },

                // 9: T clockwise (with TI floorkick)
                {
                        {WK(0, -1), WK(1, -1), WK(-1, -1), WK(0, 0), WK_END},  // L->U
                        {WK(0, 1), ARIKA_IF_NOT_CENTER, WK(1, 1), WK(-1, 1), WK_END},  // U->R
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK_END},  // R->D
                        {WK(0, 0), ARIKA_IF_NOT_CENTER, WK(1, 0), WK(-1, 0), WK_END}   // D->L
                }
        };
    }

    ;

// All pieces are started with their left side in column 5 and flat side up.
// All pieces stick to the top of the bounding box.
// All 3-wide pieces stick to the left side of the bounding box.
// I sticks to the top when left and right and occupies the second column
// when up and down.
// Try here, then try kicking one space left.  Discovered by zaphod77:
    // http://www.tetrisconcept.com/forum/viewtopic.php?t=877
    static final LJRotSystem rotTengen = new LJRotSystem();

    static {
        rotTengen.colorScheme = 1;
        rotTengen.entryOffset = new int[]{
                WK(1, 0), WK(1, 1), WK(1, 1), WK(0, 0), WK(1, 0), WK(1, 1), WK(1, 0),
                WK(0, 0), WK(1, 0), WK(0, 0)
        };
        rotTengen.entryTheta = new int[]{0, 2, 2, 0, 0, 2, 0, 0, 0, 2};
        rotTengen.kicksL = new int[]{0, 3, 3, -1, 3, 3, 3, 0, 2, 5};
        rotTengen.kicksR = new int[]{1, 4, 4, -1, 4, 4, 4, 1, 3, 5};
        rotTengen.kickTables = new int[][][]{

                // 0: I counterclockwise
                {
                        {WK(1, 1), WK(0, 1), WK_END},  // R->U
                        {WK(-1, -2), WK(-2, -2), WK_END},  // D->R
                        {WK(0, 2), WK(-1, 2), WK_END},  // L->D
                        {WK(0, -1), WK(-1, -1), WK_END}   // U->L
                },

                // 1: I clockwise
                {
                        {WK(0, 1), WK(-1, 1), WK_END},  // L->U
                        {WK(-1, -1), WK(-2, -1), WK_END},  // U->R
                        {WK(1, 2), WK(0, 2), WK_END},  // R->D
                        {WK(0, -2), WK(-1, -2), WK_END}   // D->L
                },

                // 2: I3
                {
                        {WK(0, 1), WK(-1, 1), WK_END},  // L->U
                        {WK(0, -1), WK(-1, -1), WK_END},  // U->R
                        {WK(0, 1), WK(-1, 1), WK_END},  // R->D
                        {WK(0, -1), WK(-1, -1), WK_END}   // D->L
                },

                // 3: JLSTZ counterclockwise
                {
                        {WK(1, 0), WK(0, 0), WK_END},  // R->U
                        {WK(-1, -1), WK(-2, -1), WK_END},  // D->R
                        {WK(0, 1), WK(-1, 1), WK_END},  // L->D
                        {WK(0, 0), WK(-1, 0), WK_END}   // U->L
                },

                // 4: JLSTZ clockwise
                {
                        {WK(0, 0), WK(-1, 0), WK_END},  // L->U
                        {WK(-1, 0), WK(-2, 0), WK_END},  // U->R
                        {WK(1, 1), WK(0, 1), WK_END},  // R->D
                        {WK(0, -1), WK(-1, -1), WK_END}   // D->L
                },

                // 5: L3
                {
                        {WK(0, 0), WK(-1, 0), WK_END},  // L->U
                        {WK(-1, 0), WK(-2, 0), WK_END},  // U->R
                        {WK(1, 1), WK(0, 1), WK_END},  // R->D
                        {WK(0, -1), WK(-1, -1), WK_END}   // D->L
                }
        };
    }

    ;

// NES: No wall kick
// 3-wide pieces start out one block to the right
    // I, S and Z round to the right and use effective positions R and D
    static final LJRotSystem rotNES = new LJRotSystem();

    static {
        rotNES.colorScheme = 1;
        rotNES.entryOffset = new int[]{
                WK(0, 0), WK(1, 1), WK(1, 1), WK(0, 0), WK(1, 0), WK(1, 1), WK(1, 0),
                WK(0, 0), WK(0, 0), WK(0, 0)
        };
        rotNES.entryTheta = new int[]{0, 2, 2, 0, 0, 2, 0, 0, 0, 2};
        rotNES.kicksL = new int[]{0, -1, -1, -1, 0, -1, 0, 0, -1, -1};
        rotNES.kicksR = new int[]{1, -1, -1, -1, 1, -1, 1, 1, -1, -1};
        rotNES.kickTables = new int[][][]{

                // 0: counterclockwise (round right)
                {
                        {WK(0, -1), WK_END},  // R->U
                        {WK(0, 0), WK_END},  // D->R
                        {WK(-1, 0), WK_END},  // L->D
                        {WK(1, 1), WK_END}   // U->L
                },
                // 1: clockwise (round right)
                {
                        {WK(-1, -1), WK_END},  // L->U
                        {WK(0, 1), WK_END},  // U->R
                        {WK(0, 0), WK_END},  // R->D
                        {WK(1, 0), WK_END}   // D->L
                }
        };
    }

    ;

// GB: No wall kick
    // I, S and Z round to the left and use effective positions L and D
    static final LJRotSystem rotGB = new LJRotSystem();

    static {
        rotGB.colorScheme = 1;
        rotGB.entryOffset = new int[]{
                WK(0, 0), WK(0, 1), WK(0, 1), WK(0, 0), WK(0, 0), WK(0, 1), WK(0, 0),
                WK(0, 0), WK(0, 0), WK(0, 0)
        };
        rotGB.entryTheta = new int[]{0, 2, 2, 0, 0, 2, 0, 0, 0, 2};
        rotGB.kicksL = new int[]{0, -1, -1, -1, 0, -1, 0, 0, -1, -1};
        rotGB.kicksR = new int[]{1, -1, -1, -1, 1, -1, 1, 1, -1, -1};
        rotGB.kickTables = new int[][][]{

                // 0: counterclockwise (round left)
                {
                        {WK(1, -1), WK_END},  // R->U
                        {WK(-1, 0), WK_END},  // D->R
                        {WK(0, 0), WK_END},  // L->D
                        {WK(0, 1), WK_END}   // U->L
                },
                // 1: clockwise (round left)
                {
                        {WK(0, -1), WK_END},  // L->U
                        {WK(-1, 1), WK_END},  // U->R
                        {WK(1, 0), WK_END},  // R->D
                        {WK(0, 0), WK_END}   // D->L
                },
        };
    }

    ;

// The rotation system of LOCKJAW: The Overdose (GBA) and
// Tetramino (NES) TOD is simple.  In free space it behaves like SRS.
    // If that's blocked, kick right, kick left, kick up.
    static final LJRotSystem rotTOD = new LJRotSystem();

    static {
        rotTOD.kicksL = new int[]{0, 0, 0, -1, 0, 0, 0, 0, 0, 0};
        rotTOD.kicksR = new int[]{0, 0, 0, -1, 0, 0, 0, 0, 0, 0};
        rotTOD.kickTables = new int[][][]{

                // 0: JLSTZ counterclockwise
                {
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK(0, 1), WK_END},  // ->U
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK(0, 1), WK_END},  // ->R
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK(0, 1), WK_END},  // ->D
                        {WK(0, 0), WK(1, 0), WK(-1, 0), WK(0, 1), WK_END}   // ->L
                },

                // 1: I counterclockwise
                {
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(-1, -2), WK(2, 1)},  // R->U
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(1, -1), WK(-2, 1)},  // D->R
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(-2, -1), WK(1, 2)},  // L->D
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(2, -1), WK(-1, 2)}   // U->L
                },

                // 2: JLSTZ clockwise
                {
                        {WK(0, 0), WK(-1, 0), WK(-1, -1), WK(0, 2), WK(-1, 2)},  // L->U
                        {WK(0, 0), WK(-1, 0), WK(-1, 1), WK(0, -2), WK(-1, -2)},  // U->R
                        {WK(0, 0), WK(1, 0), WK(1, -1), WK(0, 2), WK(1, 2)},  // R->D
                        {WK(0, 0), WK(1, 0), WK(1, 1), WK(0, -2), WK(1, -2)},  // D->L
                },

                // 3: I clockwise
                {
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(1, -2), WK(-2, 1)},  // L->U
                        {WK(0, 0), WK(1, 0), WK(-2, 0), WK(-2, -1), WK(1, 2)},  // U->R
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(2, -1), WK(-1, 2)},  // R->D
                        {WK(0, 0), WK(-1, 0), WK(2, 0), WK(-1, -1), WK(2, 1)}   // D->L
                }
        };
    }

    ;

    static final LJRotSystem rotTDX = new LJRotSystem();

    static {
        rotTDX.entryOffset = new int[]{
                WK(0, 0), WK(1, 1), WK(1, 1), WK(0, 0), WK(1, 0), WK(1, 1), WK(1, 0),
                WK(0, 0), WK(0, 0), WK(0, 0)
        };
        rotTDX.entryTheta = new int[]{0, 2, 2, 0, 0, 2, 0, 0, 0, 2};
        rotTDX.kicksL = new int[]{0, 0, 0, -1, 0, 0, 0, 0, 0, 0};
        rotTDX.kicksR = new int[]{1, 1, 1, -1, 1, 1, 1, 1, 1, 1};
        rotTDX.kickTables = new int[][][]{

                // 0: counterclockwise
                {
                        {WK(0, 0), WK(1, -1), WK_END},  // R->U
                        {WK(0, 0), WK(-1, -1), WK_END},  // D->R
                        {WK(0, 0), WK(-1, 1), WK_END},  // L->D
                        {WK(0, 0), WK(1, 1), WK_END}   // U->L
                },

                // 1: clockwise
                {
                        {WK(0, 0), WK(-1, -1), WK_END},  // L->U
                        {WK(0, 0), WK(-1, 1), WK_END},  // U->R
                        {WK(0, 0), WK(1, 1), WK_END},  // R->D
                        {WK(0, 0), WK(1, -1), WK_END}   // D->L
                }
        };
    }

    ;

    static final Map<LJROT,LJRotSystem> rotSystems = new EnumMap<LJROT,LJRotSystem>(LJROT.class);
    static {
        rotSystems.put(LJROT.SRS,rotSRS);
        rotSystems.put(LJROT.SEGA,rotSega);
        rotSystems.put(LJROT.ARIKA,rotArika);
        rotSystems.put(LJROT.ATARI,rotTengen);
        rotSystems.put(LJROT.NES,rotNES);
        rotSystems.put(LJROT.GB,rotGB);
        rotSystems.put(LJROT.TOD,rotTOD);
        rotSystems.put(LJROT.TDX,rotTDX);
    }

/*
    static final LJRotSystem[] rotSystems = {
            rotSRS, rotSega, rotArika, rotTengen,
            rotNES, rotGB, rotTOD, rotTDX
    };
*/

}
